package cn.gzjp.modules.rice.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

/**
 * 粮票记录Entity
 * @author zengcp
 * @version 2018-12-01
 */
public class RiceCouponLog extends DataEntity<RiceCouponLog> {
	
	private static final long serialVersionUID = 1L;
	private String openid;		// 买家openid
	private String nickName;		// 昵称
	private String headImg;		// 头像
	private String gainOpenid;		// 粮票获得者openid
	private String amount;		// 粮票数量
	private String memo;		// 备注
	private String status;  //0 未使用  1已使用
	
	public RiceCouponLog() {
		super();
	}

	public RiceCouponLog(String id){
		super(id);
	}

	@Length(min=0, max=32, message="买家openid长度必须介于 0 和 32 之间")
	@ExcelField(title="买家openid", align=2, sort=1)
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=0, max=128, message="昵称长度必须介于 0 和 128 之间")
	@ExcelField(title="昵称", align=2, sort=2)
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	@Length(min=0, max=256, message="头像长度必须介于 0 和 256 之间")
	@ExcelField(title="头像", align=2, sort=3)
	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}
	
	@Length(min=0, max=32, message="粮票获得者openid长度必须介于 0 和 32 之间")
	@ExcelField(title="粮票获得者openid", align=2, sort=4)
	public String getGainOpenid() {
		return gainOpenid;
	}

	public void setGainOpenid(String gainOpenid) {
		this.gainOpenid = gainOpenid;
	}
	
	@Length(min=0, max=11, message="粮票数量长度必须介于 0 和 11 之间")
	@ExcelField(title="粮票数量", align=2, sort=5)
	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	@Length(min=0, max=128, message="备注长度必须介于 0 和 128 之间")
	@ExcelField(title="备注", align=2, sort=6)
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}